package com.anita.member.adapter.in.web.dto;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;

/**
 * @author qiu
 * @date 2025/10/19
 * @description
 */
public record MemberRegisterRequest(
    @NotBlank(message = "用户名不能为空")
    @Size(min = 4, max = 16, message = "用户名长度必须在4-16个字符之间")
    String username,

    @Size(max = 20, message = "会员昵称不能超过20个字符")
    String nickname,

    @NotBlank(message = "密码不能为空")
    @Size(min = 6, message = "密码长度至少6位")
    String password,

    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式不正确")
    String phone,

    @Email(message = "邮箱格式不正确")
    String email,

    @Size(max = 200, message = "头像不能超过200个字符")
    String avatar
){
}
